
import Relay from "react-relay";
export default class ProductionScheduleServerMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { productionScheduleServer }`;
    }

    getVariables() { 
        return {
            argsInput: {
                action: this.props.action,
                enId: this.props.enId,
                styleNo: this.props.styleNo,
                pageSize: this.props.pageSize || 2147483647,
                psId:this.props.psId,
                startDate:this.props.startDate,
                endDate:this.props.endDate,
            }
        }
    }

   getFatQuery() {
    return Relay.QL`fragment on productionScheduleServerPayload {
            responseData {
                errorCode
                value
                totalResult
                id
                jsonData
                planAverageCount
                delayDays
                max
                productionScheduleModel{
                        cutCount
                        elapsedTime
                        status
                        ratio
                        startDate
                        createName
                        complete
                        finishDate
                        createId
                        notPlanCount
                        dayWorkHours
                        styleNo
                        surplusDays
                        productionDays
                        quantity
                        createDate
                        operatorId
                        deliverDate
                        planAverageCount
                        notComplete
                        operatorName
                        enId
                        psId
                        orderId
                        endDate
                        updateDate
                }
            }
        }`;
}

getConfigs() {
    return [{
        type: 'REQUIRED_CHILDREN',
        children: [Relay.QL`
               fragment on productionScheduleServerPayload  {
                    responseData {
                        errorCode
                        value
                        totalResult
                        id
                        jsonData
                        planAverageCount
                        delayDays
                        max
                        productionScheduleModel{
                            cutCount
                            elapsedTime
                            status
                            ratio
                            startDate
                            createName
                            complete
                            finishDate
                            createId
                            notPlanCount
                            dayWorkHours
                            styleNo
                            surplusDays
                            productionDays
                            quantity
                            createDate
                            operatorId
                            deliverDate
                            planAverageCount
                            notComplete
                            operatorName
                            enId
                            psId
                            orderId
                            endDate
                            updateDate
                        }
                    }
                 }
            `]
    }];
}

}
